<template>
  <div id="name">
    <div class="wl-body">
      <div class="xxs-bods bdds mtp slideIn">
        <div class="xx-title t-left">
          <span v-if="dqyy == 'en-US'">{{ news.titleEn }} </span>
          <span v-if="dqyy == 'zh-CN'">{{ news.title }}</span>
        </div>

        <div class="xx-time t-left">{{ news.createTime }}</div>
        <div
          class="xx-content"
          v-if="dqyy == 'zh-CN'"
          v-html="news.content"
        ></div>
        <div
          class="xx-content"
          v-if="dqyy == 'en-US'"
          v-html="news.contentEn"
        ></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "name",
  data() {
    return {
      isPublish: false,
      news: "",
    };
  },
  computed: {
    dqyy() {
      if (this.$store.getters.language) {
        return this.$store.getters.language;
      } else {
        return "zh-CN";
      }
    },
  },
  created() {
    this.news = JSON.parse(sessionStorage.getItem("news"));
    if (this.news == null) {
      this.$router.push({ path: "xx" });
    }
  },
  methods: {
    guanbi() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>